﻿@{
    Layout = "../Shared/_Default.cshtml";
    ViewBag.PageTitle = T(Res.Name("Title"));
}

@section Toolbar
{
    @{
        Html.RenderPartial("_Mode");
    }
}
<div class="box">
    <header>
        <nav>
        @{
            Html.RenderPartial("_AZIndex");
        }
        </nav>
    </header>
    <section>
    @{
        Html.RenderPartial(Request.QueryParam("view").Equals("grid")
            ? "_Grid"
            : "_List",
            (object)Model.Index);
        Html.RenderPartial("_Pager", new ViewDataDictionary 
        { 
            { "PageNum", 6 },
            { "PageCount", Math.Ceiling(JDM.Double(Model.Index.TotalCount) / Model.CountPerPage) }, 
            { "PageIndex", Request.QueryParam("page", 0) },
            { "PageParam", "page" },
            { "PageSize", Model.CountPerPage },
            { "PageRoute", Loc.Act("Index").Use("view", "azIdx").Localized() } 
        });
    }
    </section>
</div>
